﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace 定时喝水
{
    public partial class Form2 : Form
    {

        public int _T_Hour = 2;
        public int _T_Min = 0;
        public int _T_Sec = 0;
        public string _VoteStr = "应该喝水了";

        public Form2()
        {
            InitializeComponent();

            this.FormClosing += new FormClosingEventHandler(this.f2CLosingEvent);
            this.Load += new EventHandler(this.f2_Load);
        }
        private void f2_Load(object sender, EventArgs e)
        {
            //
        }
        private void f2CLosingEvent(object sender, FormClosingEventArgs e)
        {
            try
            {
                this._T_Hour = int.Parse(textBox_Hour.Text);
                this._T_Min = int.Parse(textBox_Min.Text);
                this._T_Sec = int.Parse(textBox_Sec.Text);
                this._VoteStr = textBox_VoteText.Text.Trim();
                MessageBox.Show("设置完成");
            }
            catch 
            {
                this._T_Hour = 2;
                this._T_Min = 0;
                this._T_Sec = 0;
                this._VoteStr = "及时喝水";
                MessageBox.Show("设置失败");
            }
            
        }
    }
}
